<#import '/_inc/_project.ftl' as feedbackhtml>
<#macro feedbacklist title operateUserId="">
<div id="gridtoolbar">
    <form id="gridform" class="jxlayout-form form-inline jxform">
        <input type="hidden" name="operateUserId" value="${operateUserId}">
        <div class="form-group">
            <input name="title" class="form-control w-200px" placeholder="请输入标题关键字" autocomplete="off">
        </div>
        <div class="form-group">
            <select name="category" class="form-control jxselect"
                    data-select-submit="true" data-allow-clear="false" data-width="110">
                <option value=" ">全部分类</option>
                <option value="新需求">新需求</option>
                <option value="问题">问题</option>
                <option value="优化">优化</option>
            </select>
        </div>
        <div class="form-group">
            <select name="status" class="jxselect form-control"
                    data-select-submit="true" data-allow-clear="false"
                    data-width="100">
                <@feedbackhtml.statusOptions emptyLable = "全部状态" enableLable = "已关闭" disableLable = "未关闭" selectedValue=0/>
            </select>
        </div>
        <div class="form-group">
            <select name="replyStatus" class="jxselect form-control"
                    data-select-submit="true" data-allow-clear="false"
                    data-width="130">
                <@feedbackhtml.statusOptions emptyLable = "全部回复状态" enableLable = "已回复" disableLable = "未回复"/>
            </select>
        </div>

    <#--<input class="jxswitch jxswitchsubmit" name="status" data-on-text="已关闭" data-off-text="未关闭" data-on-color="success" data-off-color="danger" value="1" data-unchecked-value="0" type="checkbox">-->
    <#--<input class="jxswitch jxswitchsubmit" name="replyStatus" data-on-text="已回复" data-off-text="未回复" data-on-color="success" data-off-color="danger" value="1" data-unchecked-value="0" type="checkbox">-->

        <div class="form-group ml-5">
            <div id="time-horizon" class="btn-group">
                <a class="btn btn-default" data-value="1">今天</a>
                <a class="btn btn-default" data-value="2">近7天</a>
                <a class="btn btn-default" data-value="3">近1个月</a>
                <a class="btn btn-default" data-value="4">近3个月</a>
                <a class="btn btn-default" data-value="5" data-toggle="popover-x"
                   data-placement="auto-bottom" data-target="#griddate-popover">
                    自定义
                </a>
            </div>
        </div>

    <#--<div class="form-group ml-5">-->
    <#--<label class="control-label">反馈日期段</label>-->
    <#--<div class="input-group date jxdate w-150px" data-options="endDate: '0d'">-->
    <#--<input id="operateStartDateTime" name="operateStartDateTime" class="form-control" autocomplete="off">-->
    <#--<span class="input-group-addon">-->
    <#--<i class="fa fa-calendar"></i>-->
    <#--</span>-->
    <#--</div>-->
    <#--</div>-->
    <#--<div class="form-group">-->
    <#--<div class="input-group date jxdate w-150px" data-options="endDate: '0d'">-->
    <#--<input id="operateEndDateTime" name="operateEndDateTime" class="form-control"-->
    <#--data-validate="{compareEqualDate:'#operateStartDateTime'}" autocomplete="off">-->
    <#--<span class="input-group-addon">-->
    <#--<i class="fa fa-calendar"></i>-->
    <#--</span>-->
    <#--</div>-->
    <#--</div>-->

        <button class="btn btn-primary ml-5" type="submit">
            <i class="fa fa-search"></i> 查询
        </button>
        <div class="btn-group">
        <#--<a id="btn-create" class="btn btn-default">-->
        <#--<i class="icon-plus"></i> 新增-->
        <#--</a>-->
        </div>
    </form>
</div>
<div id="griddate-popover" class="popover popover-x popover-default popover-lg">
    <div class="arrow"></div>
    <form id="griddateform" class="jxform form-horizontal">
        <div class="popover-title">
            <span class="close" data-dismiss="popover-x">&times;</span>反馈日期
        </div>
        <div class="popover-content">
            <div class="form-group">
                <label class="col-md-3 control-label">开始日期</label>
                <div class="col-md-8">
                    <div class="input-group date jxdate" data-options="endDate: '0d'">
                        <input id="operateStartDateTime" name="operateStartDateTime" class="form-control"
                               data-validate="{required: [true,'请选择开始日期']}" autocomplete="off">
                        <span class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-3 control-label">结束日期</label>
                <div class="col-md-8">
                    <div class="input-group date jxdate" data-options="endDate: '0d'">
                        <input id="operateEndDateTime" name="operateEndDateTime" class="form-control"
                               data-validate="{required: [true,'请选择结束日期'],compareEqualDate:'#operateStartDateTime'}" autocomplete="off">
                        <span class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </span>
                    </div>
                </div>
            </div>
        </div>
        <div class="popover-footer">
            <button id="btn-datesearch" type="button" class="btn btn-success">确定</button>
        </div>
    </form>
</div>
    <#--<#assign paramString=""/>-->
    <#--<#list params?keys as key>-->
        <#--<#assign paramString=paramString+key+":"+params[key]+","/>-->
    <#--</#list>-->
<table id="grid" title="${title}"
       data-options="form:'#gridform,#griddateform',toolbar:'#gridtoolbar',queryParams:{status:0,operateUserId:'${operateUserId}'}">
    <thead>
    <tr>
        <th data-options="title:'类型',field:'category',width:80,align:'center',sortable: true"></th>
        <th data-options="title:'标题',field:'title',width:350,align:'left'"></th>
        <th data-options="title:'反馈者',field:'operateUserName',width:100,align:'center'"></th>
        <th data-options="title:'反馈时间',field:'operateDateTime',width:170,align:'center',sortable: true"></th>
        <th data-options="title:'状态',field:'status',width:100,align:'center',formatter:jx.gf.status"></th>
        <th data-options="title:'回复状态',field:'replyStatus',width:100,align:'center',formatter:jx.gf.replyStatus"></th>
        <th data-options="title:'回复数',field:'replyCount',width:100,align:'center'"></th>
    </tr>
    </thead>
</table>
</#macro>